package zzh.fanshe1;

public class Student {

    //属性
    private String stuName;
    private int stuAge;
    private String stuNum;
    private String stuSex;
    //行为

    public Student(String stuName) {
        this.stuName = stuName;
    }

    public Student(String stuName, int stuAge, String stuNum, String stuSex) {
        this.stuName = stuName;
        this.stuAge = stuAge;
        this.stuNum = stuNum;
        this.stuSex = stuSex;
    }
    public Student (){

    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public int getStuAge() {
        return stuAge;
    }

    public void setStuAge(int stuAge) {
        this.stuAge = stuAge;
    }

    public String getStuNum() {
        return stuNum;
    }

    public void setStuNum(String stuNum) {
        this.stuNum = stuNum;
    }

    public String getStuSex() {
        return stuSex;
    }

    public void setStuSex(String stuSex) {
        this.stuSex = stuSex;
    }
    /**
     * 重载：学习行为
     */
    public void doSuding(){
        System.out.println(this.stuName+"  is studing ...");
    }
    /**
     * 重载：学习行为
     *
     * @param strAddress 学习场所
     */
    public void doSuding(String strAddress) {
        System.out.println(this.stuName+"  is studing at"+"  "+strAddress);

    }

    @Override
    public String toString() {
        return "Student{" +
                "stuName='" + stuName + '\'' +
                ", stuAge=" + stuAge +
                ", stuNum='" + stuNum + '\'' +
                ", stuSex='" + stuSex + '\'' +
                '}';
    }
}
